
#ifndef BSP_H
#define BSP_H

#include <stdio.h>
#include "at32f403a_407_conf.h"

#define BSP_FLASH_SECTOR_SIZE   2048   /* this parameter depends on the specific model of the chip */
/*
#define BSP_LCD_RST_PORT    GPIOC
#define BSP_LCD_RST_GPIO    GPIO_PINS_2
#define BSP_LCD_CS_PORT     GPIOC
#define BSP_LCD_CS_GPIO     GPIO_PINS_1
#define BSP_LCD_DC_PORT     GPIOC
#define BSP_LCD_DC_GPIO     GPIO_PINS_0
#define BSP_LCD_SPI         SPI4
#define BSP_LCD_DMA_CH      DMA1_Channel4
*/

#define BSP_ADC_CH_NUM      (3)

#define BSP_PWR_PWM_PERIOD      (5000)

extern uint32_t SystemCoreClock;
extern __IO uint16_t adc_buff[];

extern void bsp_init(void);
extern void bsp_init_later(void);

#endif
